package io.aircraft.modules.wms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.aircraft.common.service.impl.CrudServiceImpl;
import io.aircraft.common.utils.ConvertUtils;
import io.aircraft.modules.wms.dao.VwPurchaseShowDao;
import io.aircraft.modules.wms.dto.VwPurchaseShowDTO;
import io.aircraft.modules.wms.entity.VwPurchaseShowEntity;
import io.aircraft.modules.wms.service.VwPurchaseShowService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 供料展示页
 *
 * @author Cycle gengruyi01@163.com
 * @since 1.0.0 2022-10-31
 */
@Service
public class VwPurchaseShowServiceImpl extends CrudServiceImpl<VwPurchaseShowDao, VwPurchaseShowEntity, VwPurchaseShowDTO> implements VwPurchaseShowService {

    @Override
    public QueryWrapper<VwPurchaseShowEntity> getWrapper(Map<String, Object> params) {
        return null;
    }

    @Override
    public List<VwPurchaseShowDTO> selectViewList() {
        List<VwPurchaseShowEntity> entities = baseDao.selectList(null);
        return ConvertUtils.sourceToTarget(entities,VwPurchaseShowDTO.class);
    }
}